Inscoper::USBConnectionConfig¶
USBConnectionConfig class provides required information for USB devices configuration. More...
#include <USBConnectionConfig.h>
Inherits from Inscoper::ConnectionConfig
Public Functions¶
| Name | |
|---|---|
| USBConnectionConfig() Default constructor. |
|
| virtual void | fromXML(Inscoper::XMLNode & connectionNode) override Provide USB connection information from the XML node. |
| virtual void | toXML(Inscoper::XMLNode & xmlParent) override Export USB connection information in an XML node attached to the parent XML node. |
| virtual Inscoper::EConnectionType | getType() override Return the type of connection. |
| unsigned int | getMatchBitField() const Get the bit field. |
| void | setMatchBitField(unsigned int matchBitField) Set the bit field. |
| unsigned short | getVid() const Get the VID. |
| void | setVid(unsigned short vid) Set the VID. |
| unsigned short | getPid() const Get the PID. |
| void | setPid(unsigned short pid) Set the PID. |
| const std::string & | getManufacturer() const Get the manufacturer name. |
| void | setManufacturer(const std::string & manufacturer) Set the manufacturer name. |
| const std::string & | getProduct() const Get the product name. |
| void | setProduct(const std::string & product) Set the product name. |
| const std::string & | getSerialNumber() const Get the serial number. |
| void | setSerialNumber(const std::string & serialNumber) Set the serial number. |
| const std::string & | getWaitingAns() const Get the waiting answer. |
| void | setWaitingAns(const std::string & waitingAns) Set the waiting answer. |
| unsigned char | getNumInterface() const Get the interface number. |
| void | setNumInterface(unsigned char numInterface) Set the interface number. |
| unsigned short | getSubDeviceTag() const Get the sub-device tag. |
| void | setSubDeviceTag(unsigned short subDeviceTag) Set the sub-device tag. |
Additional inherited members¶
Public Functions inherited from Inscoper::ConnectionConfig
| Name | |
|---|---|
| ConnectionConfig() Constructor. |
|
| ConnectionConfig(unsigned char tag) Constructor. |
|
| virtual | ~ConnectionConfig() Default destructor. |
| unsigned short | getTag() const Get the tag of the current connection. |
| void | setTag(unsigned short tag) Set the tag of the current connection. |
Detailed Description¶
USBConnectionConfig class provides required information for USB devices configuration.
Note: This class is non-copyable and non-movable.
This class extends ConnectionConfig to manage USB-specific settings including Vendor ID (VID), Product ID (PID), serial number.
Public Functions Documentation¶
function USBConnectionConfig¶
Default constructor.
Initializes a new instance of the USBConnectionConfig class.
function fromXML¶
Provide USB connection information from the XML node.
Parameters:
- connectionNode : The XML node containing USB connection information
Exceptions:
- InscoperException If an error occurred
Reimplements: Inscoper::ConnectionConfig::fromXML
Populates the USB connection configuration from the provided XML node.
function toXML¶
Export USB connection information in an XML node attached to the parent XML node.
Parameters:
- xmlParent : The parent XML node
Exceptions:
- InscoperException If an error occurred
Reimplements: Inscoper::ConnectionConfig::toXML
Serializes the USB connection configuration to the specified parent XML node.
function getType¶
Return the type of connection.
Return: The type of connection
Reimplements: Inscoper::ConnectionConfig::getType
Retrieves the specific type of connection configuration (USB).
function getMatchBitField¶
Get the bit field.
Return: The bit field
Retrieves the bit field used to identify the USB device among those connected to the device controller.
function setMatchBitField¶
Set the bit field.
Parameters:
- matchBitField The bit field to set
Sets the bit field used to identify the USB device among those connected to the device controller.
Bit field definitions:
- MATCH_USB_VID 0x00000001
- MATCH_USB_PID 0x00000002
- MATCH_USB_IMANUFACTURER 0x00000004
- MATCH_USB_IPRODUCT 0x00000008
- MATCH_USB_ISERIALNUMBER 0x00000010
- MATCH_USB_FUNCTION 0x00000020
- MATCH_USB_NUM_INTERFACE 0x00000040
function getVid¶
Get the VID.
Return: The VID
Retrieves the Vendor ID (VID) of the USB device.
function setVid¶
Set the VID.
Parameters:
- vid : The VID
Sets the Vendor ID (VID) of the USB device.
function getPid¶
Get the PID.
Return: The PID
Retrieves the Product ID (PID) of the USB device.
function setPid¶
Set the PID.
Parameters:
- pid : The PID
Sets the Product ID (PID) of the USB device.
function getManufacturer¶
Get the manufacturer name.
Return: The manufacturer name
Retrieves the manufacturer name of the USB device.
function setManufacturer¶
Set the manufacturer name.
Parameters:
- manufacturer : The manufacturer name
Sets the manufacturer name of the USB device.
function getProduct¶
Get the product name.
Return: The product name
Retrieves the product name of the USB device.
function setProduct¶
Set the product name.
Parameters:
- product : The product name
Sets the product name of the USB device.
function getSerialNumber¶
Get the serial number.
Return: The serial number
Retrieves the serial number of the USB device.
function setSerialNumber¶
Set the serial number.
Parameters:
- serialNumber : The serial number
Sets the serial number of the USB device.
function getWaitingAns¶
Get the waiting answer.
Return: The waiting answer
Retrieves the expected response string (to differentiate devices with identical USB parameters).
function setWaitingAns¶
Set the waiting answer.
Parameters:
- waitingAns : The waiting answer
Sets the expected response string (to differentiate devices with identical USB parameters).
function getNumInterface¶
Get the interface number.
Return: The interface number
Retrieves the interface number on the USB device.
function setNumInterface¶
Set the interface number.
Parameters:
- numInterface : The interface number
Sets the interface number on the USB device.
function getSubDeviceTag¶
Get the sub-device tag.
Return: The sub-device tag
Retrieves the tag of the sub-device used to differentiate devices with identical USB parameters.
function setSubDeviceTag¶
Set the sub-device tag.
Parameters:
- subDeviceTag : The sub-device tag
Sets the tag of the sub-device used to differentiate devices with identical USB parameters.
Updated on 2026-04-02 at 10:55:36 +0200